# 需要装饰其它函数时的新功能函数
import functools


def log(method):
    @functools.wraps(method)
    def wrapper(*args, **kw):
        print(*args)
        print(**kw)
        return method(*args, **kw)

    return wrapper


@log
def now(num, num2):
    return num + num2


class View():
    @log
    def get(self, request):
        print(15 + request)
        return 15, request


# now(12, 12)

if __name__ == '__main__':
    View().get(12)
